package com.mfc.education.service.trade.feign;

import com.mfc.education.common.base.result.R;
import com.mfc.education.service.base.dto.CourseDto;
import com.mfc.education.service.base.dto.MemberDto;
import com.mfc.education.service.trade.feign.fallback.EduCourseServiceFallback;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author mfc
 * @since 2021/10/3
 */
@FeignClient(value = "service-edu", fallback = EduCourseServiceFallback.class)

@Service
public interface EduCourseService {
    /**
     * open-feign注意事项：
     * 请求路径补全
     * 路径中的变量名必须才注解中写清楚
     *
     * @param courseId
     * @return
     */
    @GetMapping("/api/edu/course/inner/get-course-dto/{courseId}")
    CourseDto getCourseDtoById(@PathVariable(value = "courseId") String courseId);

    @GetMapping("/api/edu/course/inner/update-buy-count/{id}")
    R updateBuyCountById(@PathVariable("id") String id);


}
